# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=vera++
pkgver=1.3.0
pkgrel=3
pkgdesc="tool for verification, analysis and transformation of C++ source code"
url="http://bitbucket.org/verateam/vera"
arch="all"
license="BSL-1.0"
makedepends="cmake ninja tcl-dev tk-dev python3-dev boost-dev lua-dev"
# documentation relies on pandoc, which is x86_64 only and currently broken
#subpackages="$pkgname-doc"
source="
	https://bitbucket.org/verateam/vera/downloads/vera%2B%2B-$pkgver.tar.gz

	fix-not-declared-in-this-scope.patch
	drop-failing-ruledump-test.patch
	"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DVERA_LUA=OFF \
		-DVERA_USE_SYSTEM_BOOST=ON \
		-DVERA_USE_SYSTEM_PYTHON=ON \
		-DPYTHON_EXECUTABLE=/usr/bin/python3 \

	cmake --build build
}

check() {
	cmake --build build --target test
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
4057deaa45439b4965aee9810ffa429e984fe201173ac87fa8cdc7c39f3f8dd258abf550433d4fb0c6751aaf26f564349587e191d2797e5b318a46f0b5fb5a9e  vera%2B%2B-1.3.0.tar.gz
1772d67467a50df04c9d1b56c13c9e86836582dfe7ca0f914dd5d2b8ee6622a4e1e7243bacf7c82a6367a53d81a3c3dc84b1575b2928c5a7ac5134693debb854  fix-not-declared-in-this-scope.patch
4456fec1aad874e758d146f29bc1df36896d0b8157c2705c230c2c513f6ef0ce50dcf4e0035e3cd813449722bc906082acc395bfbdffc4ca4ac3109ea90ea516  drop-failing-ruledump-test.patch
"
